package com.atmilan.quartz.sync.push.enums;

/**
 * x
 *
 * @author muyu.myw
 * @date 2020/10/26 14:08
 */
public enum StockAreaEnum {

    CN(1,"中国境内"),
    HK(2,"港澳地区"),
    EUR(3,"海外");


    int code;
    String name;

    private StockAreaEnum(int code,String name){
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static StockAreaEnum getByCode(int code){
        for(StockAreaEnum v : StockAreaEnum .values()){
            if(v.getCode() == code){
                return v;
            }
        }
        return StockAreaEnum.EUR;
    }
}
